package com.example.design.action.memento;

import sun.security.krb5.Config;

/**
 * 记录者类，获取和返回备忘录类对象信息
 */
public class ConfigOriginator {
    private ConfigFile configFile;
    public void setConfigFile(ConfigFile configFile) {
        this.configFile = configFile;
    }

    public ConfigFile getConfigFile() {
        return configFile;
    }

    public ConfigMemento saveMemento(){
        return new ConfigMemento(configFile);
    }

    public void getMemento(ConfigMemento memento){
        this.configFile = memento.getConfigFile();
    }

}
